/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author FIRE
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmContractborrow extends BasicModel<PmContractborrow> {
  contractcode?: string; // 资料编号
  htname?: string; // 资料名称
  createtime?: string; // 借阅日期
  borrowtype?: number; // 资料类型
  name?: string; // 借阅人
  phoneno?: string; // 联系电话
  personidcardno?: string; // 身份证号
  expectedreturndate?: string; // 预计归还
  actualreturndate?: string; // 归还日期
  workno?: string; // 工号
  isreturn?: number; // 是否归还
  persondepartment?: string; // persondepartment
  projectcode?: string; // 项目编号
  proname?: string; // 项目名称
}

export const pmContractborrowList = (params?: PmContractborrow | any) =>
  defHttp.get<PmContractborrow>({
    url: adminPath + '/proj/contract/pmContractborrow/list',
    params,
  });

export const pmContractborrowListData = (params?: PmContractborrow | any) =>
  defHttp.post<Page<PmContractborrow>>({
    url: adminPath + '/proj/contract/pmContractborrow/listData',
    params,
  });

export const pmContractborrowForm = (params?: PmContractborrow | any) =>
  defHttp.get<PmContractborrow>({
    url: adminPath + '/proj/contract/pmContractborrow/form',
    params,
  });

export const pmContractborrowSave = (params?: any, data?: PmContractborrow | any) =>
  defHttp.postJson<PmContractborrow>({
    url: adminPath + '/proj/contract/pmContractborrow/save',
    params,
    data,
  });

export const pmContractborrowDelete = (params?: PmContractborrow | any) =>
  defHttp.get<PmContractborrow>({
    url: adminPath + '/proj/contract/pmContractborrow/delete',
    params,
  });

export const pmContractborrowSendBack = (params?: PmContractborrow | any) =>
  defHttp.get<PmContractborrow>({
    url: adminPath + '/proj/contract/pmContractborrow/sendBack',
    params,
  });
